<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" type="text/css" href="index.css">
    <title>MVVM框架</title>
</head>

<body>

    <div id="app">
        <div class="vb">
            <p>单向绑定:</p>
            <span>薪资:{{ sal }}</span>
            <input type="text" v-bind:value="sal"><br>
        </div>
        <span class="vm_name">
            <p>双向绑定:</p>
            <span><span>姓名:{{ name }}</span></span>
            <input type="text" v-model="name">
        </span>
        <span class="vm_more">
            <span>更多-信息:{{ more.information }}</span>
            <input type="text" v-model="more.information">
        </span>
    </div>
</body>

<script src="./MVVM_frame.js"></script>

<script>
    let vm = new mvvm({
        el: '#app',
        data: {
            sal: '10000',
            name: '我',
            more: {
                information: '20岁-男'
            }
        }
    });
    console.log(vm);
</script>

</html>